package com.kkb.kkbportal.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @Author: Administrator
 * @ClassName：Special
 * @User：面向对象面向君，不负代码不负卿
 * @Data：2021/8/15
 * @Time：17:09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "Special对象", description = "特点类实体")
public class Special implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "特点类id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "特点标头", required = true)
    @NotBlank(message = "特点标头不能为空")
    private String msg;

    @ApiModelProperty(value = "特点详细描述", required = true)
    @NotBlank(message = "特点详细描述不能为空")
    private String detail;

    @ApiModelProperty(value = "图片url", required = true)
    @NotBlank(message = "图片url不能为空")
    private String imageUrl;

    @ApiModelProperty(value = "创建时间", hidden = true)
    @TableField(select = false)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间", hidden = true)
    @TableField(select = false)
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "0:未删除 其它(id):已删除", hidden = true)
    @TableField(select = false)
    @TableLogic(delval = "id")
    private Long isDeleted;
}
